<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    //创建一个定时器，每隔5000毫秒执行一次
    setInterval('alert(123);',5000);
</script>

<script>
    function f1() {
        console.log(1); //在终端打印
    }
    setInterval('f1();',5000);
</script>


</body>
</html>